home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / comm / telix351.zip / TELIX351.DAT / SIMPLE.DOC < prev    next >
Text File  |  1996-05-01  |  55KB  |  1,651 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.      T E L I X
  27.  
  28.      ────────────────────────────────────────────────────────────
  29.  
  30.      SIMPLE Programming Manual
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.                 Copyright (C) 1986-96 deltaComm Development, Inc.
  43.  
  44.                               ALL RIGHTS RESERVED.
  45.  
  46.  
  47.  
  48.  
  49.                            deltaComm Development, Inc.
  50.  
  51.                       P.O. Box 1185, Cary, NC  27512   USA
  52.  
  53.             (919)-460-4556 / (919)-460-4531 fax / (919)-481-9399 BBS
  54.      Telix v3.5x - SIMPLE Programming                       COPYRIGHT    ii
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.                                 Copyright Notice
  63.  
  64.  
  65.  
  66.  
  67.  
  68.      Telix is Copyright (c) 1986-1996 by deltaComm Development, Inc.
  69.  
  70.      SIMPLE is Copyright (c) 1990-1996 by deltaComm Development, Inc.
  71.  
  72.      This document is Copyright (c) 1990-1996 by deltaComm Development, Inc.
  73.  
  74.      No parts of Telix or this document may be copied in part or in whole,
  75.      except as provided in the License in the following pages.
  76.  
  77.  
  78.  
  79.  
  80.  
  81.      Disclaimer
  82.  
  83.      deltaComm Development, Inc., makes no warranty of any kind, either
  84.      express or implied, including but not limited to implied warranties of
  85.      merchantability and fitness for a particular purpose, with respect to
  86.      this software and accompanying documentation.
  87.  
  88.      IN NO EVENT SHALL DELTACOMM DEVELOPMENT, INC., BE LIABLE FOR ANY DAMAGES
  89.      (INCLUDING DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION,
  90.      LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) ARISING OUT OF THE
  91.      USE OF OR INABILITY TO USE THIS PROGRAM, EVEN IF DELTACOMM DEVELOPMENT,
  92.      INC., HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  93.  
  94.  
  95.  
  96.      Trademarks
  97.  
  98.      Telix is a trademark of deltaComm Development, Inc.
  99.  
  100.      SIMPLE is a trademark of deltaComm Development, Inc.
  101.  
  102.      SALT is a trademark of deltaComm Development, Inc.
  103.  
  104.      Many product names found throughout this manual are trademarks of var-
  105.      ious companies.
  106.      Telix v3.5x - SALT Programming                         Contents    iii
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.                                  C O N T E N T S
  118.  
  119.  
  120.  
  121.      1.  The Telix SIMPLE Language........................................1
  122.          1.1  What Can Be Accomplished With Simple?.......................1
  123.          1.2  Comparing SIMPLE to SALT....................................1
  124.          1.3  Creating SIMPLE Scripts.....................................1
  125.  
  126.      2.  Syntax...........................................................3
  127.  
  128.      3.  Program Structure................................................5
  129.          3.1  .i.Variables................................................5
  130.          3.2  System Variables............................................5
  131.  
  132.      4.  Built-in Functions...............................................7
  133.  
  134.      5.  Program Control.................................................25
  135.          5.1  The Waitfor Command........................................25
  136.          5.2  The If Command.............................................26
  137.          5.3  The Whenever Loop..........................................30
  138.  
  139.      6.  Index...........................................................33
  140.      Telix v3.5x - SIMPLE Programming                     Introduction    1
  141.  
  142.  
  143.  
  144.  
  145.  
  146.      1.  The Telix SIMPLE Language
  147.  
  148.  
  149.      Telix has a built-in programming language called SALT (Script
  150.      Application Language for Telix).  SALT is extremely powerful, and much
  151.      of that power is due to its semblance to the C programming language.
  152.      Along with that power comes a degree of difficulty, however.  For
  153.      those not comfortable in a structured programming environment such as
  154.      SALT, a second scripting language, SIMPLE (Salt IMPLEmentation) is
  155.      also provided.
  156.  
  157.      Simple takes a loosely structured program resembling a stream of
  158.      English sentences and transforms it into SALT for you. No programming
  159.      experience is necessary.  Its SIMPLE!
  160.  
  161.  
  162.  
  163.      1.1  What Can Be Accomplished With Simple?
  164.      ──────────────────────────────────────────────────────────────────────
  165.  
  166.      SIMPLE scripts can be used to automate logins to bulletin boards,
  167.      automate repetitive tasks such as mail transfers, or can be programmed
  168.      to watch for multiple strings, offering up the proper response to each
  169.      no matter the order in which they arrive.  SIMPLE offers you much of
  170.      the power of SALT without the learning curve.
  171.  
  172.  
  173.  
  174.      1.2  Comparing SIMPLE to SALT
  175.      ──────────────────────────────────────────────────────────────────────
  176.  
  177.      SALT's complexity allows it to do much more than SIMPLE can.  For
  178.      example, the Host+ bulletin board that comes with Telix was written
  179.      primarily in SALT, but such a task would not be possible in SIMPLE.
  180.      SALT offers access to most screen-related functions in Telix; SIMPLE
  181.      offers only a pair of commands to place information on the screen.
  182.      SALT offers full color control; SIMPLE does not.  Other differences
  183.      make SALT the preferable language for complex scripts.
  184.  
  185.      If your copy of Telix is registered, the SIMPLE compiler, CSS can
  186.      leave a copy of the translated script on your hard drive in SALT
  187.      source format.  SIMPLE is primarily a tool for helping you to master
  188.      SALT, and study of these translations are an excellent way to get
  189.      started.
  190.  
  191.  
  192.  
  193.      1.3  Creating SIMPLE Scripts
  194.      ──────────────────────────────────────────────────────────────────────
  195.  
  196.      A SIMPLE script is basically a sequence of instructions for Telix to
  197.      follow, using a loosely defined syntax.  You may use any text editor
  198.      to produce this script file, as long as its output is normal ASCII
  199.      text (this means that if you use your word processor, you must
  200.      Telix v3.5x - SIMPLE Programming                     Introduction    2
  201.  
  202.  
  203.  
  204.  
  205.  
  206.      explicitly tell it to write out the file using ASCII format and not to
  207.      embed any special codes in the file).  You may give any name you wish
  208.      to a SIMPLE script, although we recommend that you always use the
  209.      extension .SIM for clarity.  For example, a script to log on to the
  210.      Telix Support BBS might be called TELIX.SIM.
  211.  
  212.      Once you have written you script file and saved it to disk, it must be
  213.      compiled.  The program CSS.EXE included with Telix reads your "source"
  214.      script and compiles it into a form which Telix can understand.  The
  215.      compiled script can be loaded more quickly by Telix, and is also
  216.      smaller.
  217.  
  218.      To compile a SIMPLE script file, type:
  219.  
  220.           CSS <SIMPLEname> <SALTname>
  221.  
  222.      <SIMPLEname> is the name of the script we are trying to compile, and
  223.      <SALTname> is the optional name of the SALT source file to create.
  224.      <SALTname> may only be used with registered versions of Telix.
  225.  
  226.      CSS knows the naming conventions of Telix, and expects that an input
  227.      file ends in .SIM and an output file ends in .SLT, so you may simply
  228.      type:
  229.  
  230.           CSS TELIX TELIX
  231.  
  232.      If you do not supply an output name, CSS assumes the output name is
  233.      the input name followed by .SLC.  The simplest way to compile
  234.      TELIX.SIM is:
  235.  
  236.           CSS TELIX
  237.  
  238.      The CS.EXE SALT compiler must be in the DOS path in order to use CSS.
  239.  
  240.      When the script compiler finds an error in your source file, it will
  241.      abort the compile process and give you the line number on which the
  242.      error occurred, as well as the type of error.  The error should then
  243.      be fixed and the source recompiled.  This is repeated until the
  244.      compiled detects no more errors in your script file.
  245.  
  246.      The compiled script can then be run in Telix using several methods.
  247.      It may be run using the 'Run Script' command, as a command line
  248.      parameter to Telix, as a linked script to a dialing directory entry
  249.      (i.e. automatically, when you connect to a system), or from another
  250.      script.  The first three methods are described in the Telix manual,
  251.      while the last is described later in this manual.
  252.      Telix v3.5x -